<template>
	<view class="contina">
		<view class="w" style="height: calc(100% - 20rpx);">
			<scroll-view scroll-y class="scrollView" v-if="list.length > 0">
				<template v-for="item in list">
					<view class="card">
						<view class="top">
							<view class="orderNo">单号：{{item.no}}</view>
							<view class="payTime">购买日期：{{item.update_at}}</view>
						</view>
						<view class="content">
							<view class="flex_a_c par">
								<view class="label">企业名称</view>
								<view class="value">{{item.corp.name}}</view>
							</view>
							<view class="flex_a_c par">
								<view class="label">服务内容</view>
								<view class="value">{{item.product_title}}</view>
							</view>
							<view class="flex_a_c par">
								<view class="label">有效期</view>
								<view class="value">{{item.star_at}}至{{item.end_at}}</view>
							</view>
						</view>
						<view class="price">
							<view class="t">{{item.amount}}</view>
							<view class="i">¥</view>
						</view>
					</view>
				</template>
			</scroll-view>
			<view class="no" v-else>
				<image src="../../static/image/none.png"></image>
				<view class="em">暂无数据</view>
			</view>
		</view>
	</view>
</template>

<script>
	import searchCom from "@/compoment/searchCom.vue";
	import flooterCom from "@/compoment/flooterCom.vue"
	export default {
		data() {
			return {
				list: [],
			}
		},
		onLoad(option) {
			this.$api.corpPayApi.list({
				ids: option.ids
			}).then(res => {
				this.list = res.list
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.contina {
		height: 100%;

		.seach {
			padding: 20rpx 30rpx;
			background-color: #fff;
			box-sizing: border-box;

			.tabs {
				justify-content: space-between;
				align-items: center;
				font-size: 26rpx;
				font-weight: 400;
				color: #3D3D3D;
				margin-top: 30rpx;
			}
		}

		.scrollView {
			height: 100%;

			.card {
				padding: 30rpx;
				box-sizing: border-box;
				position: relative;
				margin-top: 20rpx;

				.top {
					.orderNo {
						font-size: 28rpx;
						font-weight: 400;
						color: #000000;
					}

					.payTime {
						font-size: 28rpx;
						font-weight: 400;
						color: #888888;
						margin-top: 10rpx;
					}
				}

				.content {
					box-sizing: border-box;
					background: #F5F8FF;
					border-radius: 5px 5px 5px 5px;
					padding: 30rpx;
					margin-top: 30rpx;

					.par {
						justify-content: space-between;
						margin-bottom: 30rpx;
					}

					.par:last-child {
						margin-bottom: 0;
					}

					.label {
						font-size: 28rpx;
						font-weight: 400;
						color: #999999;
						margin-right: 20rpx;
					}

					.value {
						font-size: 24rpx;
						font-weight: 400;
						color: #000000;
					}
				}

				.price {
					display: flex;
					align-items: flex-end;
					font-size: 32rpx;
					font-weight: 400;
					color: #000000;
					flex-direction: row-reverse;
					margin-top: 30rpx;

					.i {
						font-size: 24rpx;
					}

					.t {
						margin-left: 5rpx;
					}
				}
			}
		}

		image {
			width: 412rpx;
			height: 284rpx;
			border-radius: 0px 0px 0px 0px;
		}

		.no {
			margin-top: 50rpx;
			display: flex;
			justify-content: center;
			flex-direction: column;
			align-items: center;
			margin-top: 332rpx;

			.em {
				width: 128rpx;
				height: 50rpx;
				font-size: 32rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				color: #888888;
			}
		}


	}
</style>